From beabb5f2ea590f1af5c8fa58c401b53d71ea663c Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 11 Jun 2022 10:26:47 +0000
Subject: [PATCH] TODO

---
 src/bindgen/cargo/cargo_metadata.rs | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/src/bindgen/cargo/cargo_metadata.rs b/src/bindgen/cargo/cargo_metadata.rs
index 0b977d4..29aca50 100644
--- a/src/bindgen/cargo/cargo_metadata.rs
+++ b/src/bindgen/cargo/cargo_metadata.rs
@@ -184,20 +184,6 @@ pub fn metadata(
-    let output;
     let metadata = match existing_metadata_file {
         Some(path) => Cow::Owned(std::fs::read_to_string(path)?),
-        None => {
-            let cargo = env::var("CARGO").unwrap_or_else(|_| String::from("cargo"));
-            let mut cmd = Command::new(cargo);
-            cmd.arg("metadata");
-            cmd.arg("--all-features");
-            cmd.arg("--format-version").arg("1");
-            cmd.arg("--manifest-path");
-            cmd.arg(manifest_path);
-            output = cmd.output()?;
-            if !output.status.success() {
-                return Err(Error::Metadata(output));
-            }
-            Cow::Borrowed(std::str::from_utf8(&output.stdout)?)
-        }
+        None => Cow::Owned(std::fs::read_to_string(env::var("ANTIOXIDANT_CBINDGEN_METADATA").expect("add the generate-cbindgen-metadata phase to the package definition"))?)
     };
 
     let meta: Metadata = serde_json::from_str(&*metadata)?;

base-commit: d9e490ce8b836194595bd30611253a7028059da2
-- 
2.30.2

